#include <iostream>
using namespace std;
typedef long long LL;
#define endl '\n'
const int N = 5e5 + 10;
int a[N];
void solve() 
{
    int n; cin >> n;
    int s = 0;
    for(int i = 1; i <= n; i++) 
    {
        cin >> a[i];
        s ^= a[i];
    }
    if(!s) cout << "lose" << endl;
    else
    {
      
        for(int i = 1; i <= n; i++)
        {
            if((a[i] ^ s) < a[i]) 
            {
                cout << (a[i] - (a[i] ^ s)) << " " << i << endl;
                a[i] ^= s;
                break;
            }
        }
        for(int i = 1; i <= n; i++) cout << a[i] << " ";
    }
}

int main()
{
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int T = 1;
	// cin >> T;
	while(T--)
	{
        solve();
	}
	return 0;
}